Recently, there is a mobile phone on which a three-axis acceleration sensor is mounted for counting the number of steps on foot. For example, Japanese Patent Laid-Open No. 2005-157465 discloses a technique of counting the number of steps from an acceleration resulting from a combination of fluctuation components which are obtained by excluding gravity components from values output from an acceleration sensor. With this technique of counting the number of steps, however, the number of steps is counted from the acceleration obtained by combining the fluctuation components from which the gravity components are excluded, and thus, the direction of gravity (gravity direction) is not detected. This means that if a horizontal acceleration is generated, the number of steps cannot be counted. Furthermore, as a mobile phone is generally provided with the vibration function for notifying the user of an incoming call or the like by a vibrating alert, the acceleration which is generated by the vibration function while the vibration function is working may be detected by the acceleration sensor, hindering counting of the number of steps while the vibration function is working.
The walking cycle of a person, with a frequency of 2 to 4 Hz, is lower than the cycle of the vibration function. Thus, it may be conceivable to apply Fourier transform to the values output from the acceleration sensor so as to exclude the acceleration that is generated while the vibration function is working. The Fourier transform, however, requires considerable computational effort, which causes the need of speeding up the arithmetic unit, leading to an increased cost. While it may also be conceivable to detect the vibration with the frequencies of 2 to 4 Hz, a low-pass filter circuit will have to be provided, leading to an increased cost as well as an increased device size.